
 var form = layui.form;

 form.verify({
   same:function(value){
     let uname=$('.layui-form input[name=password]').val()
     if(value !=uname){
       return '两次输入的密码不一样'
     }
   }
 })
$('.layui-form').submit(function(e){
  e.preventDefault();
  let ad=$(this).serialize()
  $.ajax({
    type:'post',
    url:'/admin/users',
    data:ad,
    success:function(res){
      layer.msg(res.message)
    }
  })
})

